<template>
  <div class="content">
    <!-- PC 列表 -->
    <div class="hidden-in-xs list-container">
      <div class="title">
        <p>{{name}}</p>
        <!-- <p>about-us</p> -->
      </div>
      <ul>
        <li class="active" v-for="item in nav">
          <router-link :to="item.cate_url+'/'+$route.params.active">
            <span>·</span>{{item.cate_name}}
            <i class="fas fa-chevron-right"></i>
          </router-link>
        </li>
      </ul>
    </div>
    <!-- Wap 列表 -->
    <div class="xs-only list-container1" :class="{'mask':show}" @click="show=!show">
      <div class="now-choice">
        <p>{{name}}</p>
        <i class="fas fa-angle-down"></i>
      </div>
      <div class="list" v-show="show">
        <ul>
          <li v-for="item in nav">
            <router-link :to="item.cate_url+'/'+$route.params.active">{{item.cate_name}}</router-link>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>
<style lang="less" scoped>
  @import url('../style/mixin.less');
  .container {
    .list-container {
      width: 280px;
      height: 100%;
      text-align: left;
      text-indent: 20px;
      float: left;
      margin-bottom: 65px;
      .title {
        width: 100%;
        height: 100px;
        background: #a17657;
        color: #ffffff;
        p:first-child {
          height: 24px;
          font-size: 24px;
          font-weight: normal;
          font-stretch: normal;
          line-height: 24px;
          letter-spacing: 1px;
          padding-top: 27px;
        }
        p:last-child {
          height: 17px;
          font-size: 20px;
          font-weight: normal;
          font-stretch: normal;
          line-height: 24px;
          letter-spacing: 0px;
          margin-top: 5px;
        }
      }
      ul {
        li {
          width: 100%;
          height: 60px;
          line-height: 60px;
          font-size: 18px;
          font-weight: normal;
          font-stretch: normal;
          letter-spacing: 1px;
          color: #a17657;
          border-bottom: 1px solid #a17657;
          a {
            .A-all-state( {
              color: #a17656;
              text-decoration: none;
            }
            );
          }
          span {
            font-weight: bold;
            margin-right: 20px;
          }
          i {
            float: right;
            line-height: 60px;
            font-size: 15px;
            margin-right: 25px;
          }
          &.active {
            color: #543e2e;
            font-weight: bold;
          }
        }
      }
    }
    .list-container1 {
      width: 100%;
      position: absolute;
      top: 44px;
      left: 0;
      &.mask {
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 3;
        .now-choice {
          background: #FFF;
        }
      }
      .now-choice {
        width: 100%;
        height: 44px;
        line-height: 44px;
        background-color: rgba(255, 255, 255, 0.9);
        box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.27);
        p {
          font-size: 12px;
          font-weight: normal;
          font-stretch: normal;
          letter-spacing: 0px;
          color: #573114;
          text-align: left;
          margin-left: 20px;
          float: left;
        }
        i {
          float: right;
          line-height: 44px;
          margin-right: 20px;
          color: #a17657;
          font-size: 12px;
        }
      }
      .list {
        width: 100%;
        background: #FFF;
        ul {
          width: calc(100% - 40px);
          margin: 0 20px;
          padding-bottom: 20px;
          li {
            height: 40px;
            width: 100%;
            line-height: 40px;
            text-align: left;
            text-indent: 10px;
            border-bottom: 1px solid #a17656;
            font-size: 12px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0px;
            color: #a17657;
            a {
              .A-all-state( {
                color: #a17656;
                text-decoration: none;
              }
              );
            }

          }
        }
      }
    }
  }

</style>
<script>
  export default {
    props: ['nav','name'],
    data() {
      return {
        show: false
      }
    }
  }

</script>
